using System;
using System.ComponentModel;
using System.Data;
using System.Data.SqlTypes;
using System.Diagnostics;
using System.Globalization;
namespace Fcdbas.Core
{
	[System.Diagnostics.DebuggerDisplay("{Value}")]
	[System.Serializable]
	public struct SalBoolean : System.IComparable, System.IConvertible, System.IFormattable, INullable, ISalType
	{
		[Browsable(false), System.Diagnostics.DebuggerStepThrough, System.Obsolete("Replaced by SalArray<T>.")]
		[System.Serializable]
		public class Array : SalArray<SalBoolean>
		{
			public Array()
			{
			}
			public Array(params int[] elems) : base(elems)
			{
			}
			public Array(params string[] elems) : base(elems)
			{
			}
			protected override object CreateInstance()
			{
				return SalBoolean.False;
			}
		}
		public static readonly SalBoolean Null = new SalBoolean(System.DBNull.Value);
		public static readonly SalBoolean False = new SalBoolean(false);
		public static readonly SalBoolean True = new SalBoolean(true);
		private decimal m_value;
		private bool m_isNull;
		public bool IsNull
		{
			[System.Diagnostics.DebuggerStepThrough]
			get
			{
				return this.m_isNull;
			}
		}
		public decimal Value
		{
			[System.Diagnostics.DebuggerStepThrough]
			get
			{
				return this.m_value;
			}
		}
		DbType ISalType.DbType
		{
			get
			{
				return DbType.Decimal;
			}
		}
		object ISalType.Value
		{
			get
			{
				if (this.IsNull)
				{
					return System.DBNull.Value;
				}
				return this.Value;
			}
		}
		[System.Diagnostics.DebuggerStepThrough]
		public SalBoolean(bool x)
		{
			this.m_value = (x ? 1m : 0m);
			this.m_isNull = false;
		}
		[System.Diagnostics.DebuggerStepThrough]
		private SalBoolean(System.DBNull x)
		{
			this.m_value = 0m;
			this.m_isNull = true;
		}
		[System.Diagnostics.DebuggerStepThrough]
		internal SalBoolean(SalNumber x)
		{
			this.m_value = x.Value;
			this.m_isNull = x.IsNull;
		}
		[System.Diagnostics.DebuggerStepThrough]
		internal SalBoolean(decimal x)
		{
			this.m_value = x;
			this.m_isNull = false;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator decimal(SalBoolean x)
		{
			return x.ToDecimal();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator int(SalBoolean x)
		{
			return x.ToInt32();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator double(SalBoolean x)
		{
			return x.ToDouble();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator float(SalBoolean x)
		{
			return x.ToSingle();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator System.IntPtr(SalBoolean x)
		{
			return new System.IntPtr(x);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static explicit operator uint(SalBoolean x)
		{
			return x.ToUInt32();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static explicit operator long(SalBoolean x)
		{
			return x.ToInt64();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static explicit operator ulong(SalBoolean x)
		{
			return x.ToUInt64();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static explicit operator char(SalBoolean x)
		{
			return x.ToChar();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static explicit operator short(SalBoolean x)
		{
			return x.ToInt16();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static explicit operator ushort(SalBoolean x)
		{
			return x.ToUInt16();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static explicit operator byte(SalBoolean x)
		{
			return x.ToByte();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public decimal ToDecimal()
		{
			return this.m_value;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public double ToDouble()
		{
			return (double)this.m_value;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public float ToSingle()
		{
			return (float)this.m_value;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public long ToInt64()
		{
			return (long)this.m_value;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public int ToInt32()
		{
			int num = decimal.GetBits(decimal.Truncate(this.m_value))[0];
			if (this.m_value < 0m)
			{
				return -num;
			}
			return num;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public System.IntPtr ToIntPtr()
		{
			return new System.IntPtr(this.ToInt32());
		}
		[System.Diagnostics.DebuggerStepThrough]
		public short ToInt16()
		{
			return (short)this.ToInt32();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public char ToChar()
		{
			return (char)this.ToInt32();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public byte ToByte()
		{
			return (byte)this.ToInt32();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public ulong ToUInt64()
		{
			return (ulong)this.m_value;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public uint ToUInt32()
		{
			return (uint)this.ToInt32();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public ushort ToUInt16()
		{
			return (ushort)this.ToInt32();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public sbyte ToSByte()
		{
			return (sbyte)this.ToInt32();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public bool ToBoolean()
		{
			return decimal.Compare(this.m_value, 0m) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator SalBoolean(SalNumber x)
		{
			return new SalBoolean(x);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator SalBoolean(System.DBNull n)
		{
			return SalBoolean.Null;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator SalBoolean(decimal x)
		{
			return new SalBoolean(x);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator SalBoolean(double x)
		{
			return new SalBoolean((decimal)x);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator SalBoolean(float x)
		{
			return new SalBoolean((decimal)x);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator SalBoolean(int x)
		{
			return new SalBoolean((SalNumber)x);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator SalBoolean(uint x)
		{
            return new SalBoolean((SalNumber)x);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator SalBoolean(bool x)
		{
			if (!x)
			{
				return SalBoolean.False;
			}
			return SalBoolean.True;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator SalBoolean(long x)
		{
			return new SalBoolean((SalNumber)x);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator SalBoolean(ulong x)
		{
            return new SalBoolean((SalNumber)x);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator SalBoolean(short x)
		{
            return new SalBoolean((SalNumber)x);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator SalBoolean(byte x)
		{
            return new SalBoolean((SalNumber)x);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator SalBoolean(char x)
		{
            return new SalBoolean((SalNumber)x);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean Add(SalBoolean x, SalBoolean y)
		{
			return new SalBoolean(decimal.Add(x.m_value, y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(SalBoolean x, SalBoolean y)
		{
			return new SalBoolean(decimal.Add(x.m_value, y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(decimal x, SalBoolean y)
		{
			return new SalBoolean(decimal.Add(x, y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(SalBoolean x, decimal y)
		{
			return new SalBoolean(decimal.Add(x.m_value, y));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(double x, SalBoolean y)
		{
			return new SalBoolean(decimal.Add(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(SalBoolean x, double y)
		{
			return new SalBoolean(decimal.Add(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(float x, SalBoolean y)
		{
			return new SalBoolean(decimal.Add(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(SalBoolean x, float y)
		{
			return new SalBoolean(decimal.Add(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(long x, SalBoolean y)
		{
			return new SalBoolean(decimal.Add(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(SalBoolean x, long y)
		{
			return new SalBoolean(decimal.Add(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(int x, SalBoolean y)
		{
			return new SalBoolean(decimal.Add(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(SalBoolean x, int y)
		{
			return new SalBoolean(decimal.Add(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(uint x, SalBoolean y)
		{
			return new SalBoolean(decimal.Add(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(SalBoolean x, uint y)
		{
			return new SalBoolean(decimal.Add(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean Subtract(SalBoolean x, SalBoolean y)
		{
			return new SalBoolean(decimal.Subtract(x.m_value, y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(SalBoolean x, SalBoolean y)
		{
			return new SalBoolean(decimal.Subtract(x.m_value, y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(decimal x, SalBoolean y)
		{
			return new SalBoolean(decimal.Subtract(x, y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(SalBoolean x, decimal y)
		{
			return new SalBoolean(decimal.Subtract(x.m_value, y));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(double x, SalBoolean y)
		{
			return new SalBoolean(decimal.Subtract(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(SalBoolean x, double y)
		{
			return new SalBoolean(decimal.Subtract(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(float x, SalBoolean y)
		{
			return new SalBoolean(decimal.Subtract(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(SalBoolean x, float y)
		{
			return new SalBoolean(decimal.Subtract(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(long x, SalBoolean y)
		{
			return new SalBoolean(decimal.Subtract(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(SalBoolean x, long y)
		{
			return new SalBoolean(decimal.Subtract(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(int x, SalBoolean y)
		{
			return new SalBoolean(decimal.Subtract(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(SalBoolean x, int y)
		{
			return new SalBoolean(decimal.Subtract(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(uint x, SalBoolean y)
		{
			return new SalBoolean(decimal.Subtract(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(SalBoolean x, uint y)
		{
			return new SalBoolean(decimal.Subtract(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean Multiply(SalBoolean x, SalBoolean y)
		{
			return new SalBoolean(decimal.Multiply(x.m_value, y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator *(SalBoolean x, SalBoolean y)
		{
			return new SalBoolean(decimal.Multiply(x.m_value, y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator *(decimal x, SalBoolean y)
		{
			return new SalBoolean(decimal.Multiply(x, y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator *(SalBoolean x, decimal y)
		{
			return new SalBoolean(decimal.Multiply(x.m_value, y));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator *(double x, SalBoolean y)
		{
			return new SalBoolean(decimal.Multiply(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator *(SalBoolean x, double y)
		{
			return new SalBoolean(decimal.Multiply(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator *(float x, SalBoolean y)
		{
			return new SalBoolean(decimal.Multiply(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator *(SalBoolean x, float y)
		{
			return new SalBoolean(decimal.Multiply(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator *(long x, SalBoolean y)
		{
			return new SalBoolean(decimal.Multiply(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator *(SalBoolean x, long y)
		{
			return new SalBoolean(decimal.Multiply(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator *(int x, SalBoolean y)
		{
			return new SalBoolean(decimal.Multiply(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator *(SalBoolean x, int y)
		{
			return new SalBoolean(decimal.Multiply(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator *(uint x, SalBoolean y)
		{
			return new SalBoolean(decimal.Multiply(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator *(SalBoolean x, uint y)
		{
			return new SalBoolean(decimal.Multiply(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean Divide(SalBoolean x, SalBoolean y)
		{
			return new SalBoolean(decimal.Divide(x.m_value, y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator /(SalBoolean x, SalBoolean y)
		{
			return new SalBoolean(decimal.Divide(x.m_value, y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator /(decimal x, SalBoolean y)
		{
			return new SalBoolean(decimal.Divide(x, y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator /(SalBoolean x, decimal y)
		{
			return new SalBoolean(decimal.Divide(x.m_value, y));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator /(double x, SalBoolean y)
		{
			return new SalBoolean(decimal.Divide(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator /(SalBoolean x, double y)
		{
			return new SalBoolean(decimal.Divide(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator /(float x, SalBoolean y)
		{
			return new SalBoolean(decimal.Divide(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator /(SalBoolean x, float y)
		{
			return new SalBoolean(decimal.Divide(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator /(long x, SalBoolean y)
		{
			return new SalBoolean(decimal.Divide(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator /(SalBoolean x, long y)
		{
			return new SalBoolean(decimal.Divide(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator /(int x, SalBoolean y)
		{
			return new SalBoolean(decimal.Divide(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator /(SalBoolean x, int y)
		{
			return new SalBoolean(decimal.Divide(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator /(uint x, SalBoolean y)
		{
			return new SalBoolean(decimal.Divide(new decimal(x), y.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator /(SalBoolean x, uint y)
		{
			return new SalBoolean(decimal.Divide(x.m_value, new decimal(y)));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean Negate(SalBoolean x)
		{
			if (x.IsNull)
			{
				return SalBoolean.Null;
			}
			return new SalBoolean(decimal.Negate(x.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator -(SalBoolean x)
		{
			if (x.IsNull)
			{
				return SalBoolean.Null;
			}
			return new SalBoolean(decimal.Negate(x.m_value));
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator +(SalBoolean x)
		{
			return x;
		}
		public static int Compare(SalBoolean x, SalBoolean y)
		{
			if (x.IsNull)
			{
				if (!y.IsNull)
				{
					return -1;
				}
				return 0;
			}
			else
			{
				if (y.IsNull)
				{
					return 1;
				}
				return decimal.Compare(x.m_value, y.m_value);
			}
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(SalBoolean x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(decimal x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(SalBoolean x, decimal y)
		{
			return SalBoolean.Compare(x, y) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(double x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(SalBoolean x, double y)
		{
			return SalBoolean.Compare(x, y) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(float x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(SalBoolean x, float y)
		{
			return SalBoolean.Compare(x, y) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(long x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(SalBoolean x, long y)
		{
			return SalBoolean.Compare(x, y) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(int x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(SalBoolean x, int y)
		{
			return SalBoolean.Compare(x, y) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(uint x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(SalBoolean x, uint y)
		{
			return SalBoolean.Compare(x, y) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(bool x, SalBoolean y)
		{
			return !y.IsNull && x == y.ToBoolean();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator ==(SalBoolean x, bool y)
		{
			return !x.IsNull && x.ToBoolean() == y;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(SalBoolean x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(decimal x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(SalBoolean x, decimal y)
		{
			return SalBoolean.Compare(x, y) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(double x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(SalBoolean x, double y)
		{
			return SalBoolean.Compare(x, y) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(float x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(SalBoolean x, float y)
		{
			return SalBoolean.Compare(x, y) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(long x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(SalBoolean x, long y)
		{
			return SalBoolean.Compare(x, y) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(int x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(SalBoolean x, int y)
		{
			return SalBoolean.Compare(x, y) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(uint x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(SalBoolean x, uint y)
		{
			return SalBoolean.Compare(x, y) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(bool x, SalBoolean y)
		{
			return y.IsNull || x != y.ToBoolean();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !=(SalBoolean x, bool y)
		{
			return x.IsNull || x.ToBoolean() != y;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(SalBoolean x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(decimal x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(SalBoolean x, decimal y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(double x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(SalBoolean x, double y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(float x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(SalBoolean x, float y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(long x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(SalBoolean x, long y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(ulong x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(SalBoolean x, ulong y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(int x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(SalBoolean x, int y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(uint x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >(SalBoolean x, uint y)
		{
			return SalBoolean.Compare(x, y) > 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(SalBoolean x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(decimal x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(SalBoolean x, decimal y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(double x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(SalBoolean x, double y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(float x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(SalBoolean x, float y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(long x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(SalBoolean x, long y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(ulong x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(SalBoolean x, ulong y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(int x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(SalBoolean x, int y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(uint x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <(SalBoolean x, uint y)
		{
			return SalBoolean.Compare(x, y) < 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(SalBoolean x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(decimal x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(SalBoolean x, decimal y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(double x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(SalBoolean x, double y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(float x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(SalBoolean x, float y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(long x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(SalBoolean x, long y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(ulong x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(SalBoolean x, ulong y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(int x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(SalBoolean x, int y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(uint x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator >=(SalBoolean x, uint y)
		{
			return SalBoolean.Compare(x, y) >= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(SalBoolean x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(decimal x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(SalBoolean x, decimal y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(double x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(SalBoolean x, double y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(float x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(SalBoolean x, float y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(long x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(SalBoolean x, long y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(ulong x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(SalBoolean x, ulong y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(int x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(SalBoolean x, int y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(uint x, SalBoolean y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator <=(SalBoolean x, uint y)
		{
			return SalBoolean.Compare(x, y) <= 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static implicit operator bool(SalBoolean x)
		{
			return decimal.Compare(x.m_value, 0m) != 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator !(SalBoolean x)
		{
			return decimal.Compare(x.m_value, 0m) == 0;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator |(SalBoolean val1, SalBoolean val2)
		{
			return val1.ToBoolean() | val2.ToBoolean();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static SalBoolean operator &(SalBoolean val1, SalBoolean val2)
		{
			return val1.ToBoolean() & val2.ToBoolean();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator true(SalBoolean val)
		{
			return val.m_value != 0m;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public static bool operator false(SalBoolean val)
		{
			return val.m_value == 0m;
		}
		[System.Diagnostics.DebuggerStepThrough]
		public override bool Equals(object obj)
		{
			if (obj is SalBoolean)
			{
				return SalBoolean.Compare(this, (SalBoolean)obj) == 0;
			}
			return this.m_value.Equals(obj);
		}
		public override int GetHashCode()
		{
			return this.m_value.GetHashCode();
		}
		[System.Diagnostics.DebuggerStepThrough]
		public override string ToString()
		{
			return ((System.IConvertible)this).ToString(null);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public SalString ToString(System.IFormatProvider provider)
		{
			return ((System.IFormattable)this).ToString(null, provider);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public string ToString(string format)
		{
			return ((System.IFormattable)this).ToString(format, null);
		}
		[System.Diagnostics.DebuggerStepThrough]
		public string ToString(string format, System.IFormatProvider provider)
		{
			return ((System.IFormattable)this).ToString(format, provider);
		}
		public SalString ToString(int decimals)
		{
			if (this.IsNull)
			{
				return string.Empty;
			}
			System.Globalization.NumberFormatInfo numberFormatInfo = (System.Globalization.NumberFormatInfo)System.Globalization.NumberFormatInfo.CurrentInfo.Clone();
			numberFormatInfo.NumberGroupSeparator = string.Empty;
			numberFormatInfo.NumberDecimalDigits = System.Math.Max(0, decimals);
			return this.m_value.ToString("N", numberFormatInfo);
		}
		public SalNumber ToString(int decimals, ref SalString target)
		{
			target = this.ToString(decimals);
			return target.Length;
		}
		public int CompareTo(object obj)
		{
			if (obj is SalBoolean)
			{
				return this.CompareTo((SalBoolean)obj);
			}
			return this.m_value.CompareTo(obj);
		}
		public int CompareTo(SalBoolean x)
		{
			return SalBoolean.Compare(this, x);
		}
		ulong System.IConvertible.ToUInt64(System.IFormatProvider provider)
		{
			return this.ToUInt64();
		}
		sbyte System.IConvertible.ToSByte(System.IFormatProvider provider)
		{
			return this.ToSByte();
		}
		double System.IConvertible.ToDouble(System.IFormatProvider provider)
		{
			return this.ToDouble();
		}
		System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider provider)
		{
			return System.Convert.ToDateTime(this.m_value);
		}
		float System.IConvertible.ToSingle(System.IFormatProvider provider)
		{
			return this.ToSingle();
		}
		bool System.IConvertible.ToBoolean(System.IFormatProvider provider)
		{
			return this.ToBoolean();
		}
		int System.IConvertible.ToInt32(System.IFormatProvider provider)
		{
			return this.ToInt32();
		}
		ushort System.IConvertible.ToUInt16(System.IFormatProvider provider)
		{
			return this.ToUInt16();
		}
		short System.IConvertible.ToInt16(System.IFormatProvider provider)
		{
			return this.ToInt16();
		}
		byte System.IConvertible.ToByte(System.IFormatProvider provider)
		{
			return this.ToByte();
		}
		char System.IConvertible.ToChar(System.IFormatProvider provider)
		{
			return this.ToChar();
		}
		long System.IConvertible.ToInt64(System.IFormatProvider provider)
		{
			return this.ToInt64();
		}
		uint System.IConvertible.ToUInt32(System.IFormatProvider provider)
		{
			return this.ToUInt32();
		}
		decimal System.IConvertible.ToDecimal(System.IFormatProvider provider)
		{
			return this.ToDecimal();
		}
		System.TypeCode System.IConvertible.GetTypeCode()
		{
			return System.TypeCode.Decimal;
		}
		object System.IConvertible.ToType(System.Type targetType, System.IFormatProvider provider)
		{
			if (targetType == typeof(SalBoolean))
			{
				return this;
			}
			return ((System.IConvertible)this.m_value).ToType(targetType, provider);
		}
		string System.IConvertible.ToString(System.IFormatProvider provider)
		{
			return ((System.IFormattable)this).ToString(null, provider);
		}
		string System.IFormattable.ToString(string format, System.IFormatProvider provider)
		{
			if (this.IsNull)
			{
				return string.Empty;
			}
			if (format == null || format.Length == 0)
			{
				format = "0.#############################";
			}
			string result;
			try
			{
				result = this.m_value.ToString(format, provider);
			}
			catch (System.FormatException)
			{
				result = string.Empty;
			}
			return result;
		}
	}
}
